package acwing._2LanQiao._5BinaryIndexedTree_SegmentTree;

/**
 * @Project : ProgrammingExercises
 * @Package : ACWing._2LanQiao._5BinaryIndexedTree_SegmentTree
 * @File : Q1265.java
 * @Author : WangRuoyu
 * @Date : 2023/3/17 8:54
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Q1265 {
    static int[] grade;
    static final int N = 32002;
    static int[] tree = new int[N];

    static int lowbit(int x) {
        return x & -x;
    }

    static void add(int x, int c) {
        for (int i = x; i <= N - 1; i += lowbit(i)) {
            tree[i] += c;
        }
    }

    static int sum(int x) {
        int ans = 0;
        for (int i = x; i > 0; i -= lowbit(i)) {
            ans += tree[i];
        }
        return ans;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] words = br.readLine().split(" ");

        int n = Integer.parseInt(words[0]);
        grade = new int[n];

        for (int i = 1; i <= n; ++i) {
            words = br.readLine().split(" ");
            int xid = Integer.parseInt(words[0]) + 1;
            add(xid, 1);
            grade[sum(xid) - 1]++;
        }

        for (int i = 0; i < n; ++i) {
            System.out.println(grade[i]);
        }
    }
}
